#include <stdio.h>
#include <string.h>
typedef struct {
	int age;
	float height;
	char name[10];
} sperson;
sperson *read(void) {
	static sperson prsn = {0};
	printf("请输入年龄：");
	scanf("%d",&(prsn.age));
	printf("请输入身高：");
	scanf("%g",&(prsn.height));
	scanf("%*[^\n]");
	scanf("%*c");
	printf("请输入姓名：");
	fgets(prsn.name, 10, stdin);
	if(strlen(prsn.name) == 9 && prsn.name[8] != 'n') {
		scanf("%*[^\n]");
		scanf("%*c");
	}
	return &prsn;
}
void print(const sperson *p_person) {
	printf("年龄是%d\n", p_person->age);
	printf("身高是%g\n", p_person->height);
	printf("姓名是%s\n", p_person->name);
}
int main() {
	sperson *p_person = read();
	print(p_person);
	return 0;
}

